/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Preguntas.java
 *
 * Created on 14-nov-2011, 21:03:20
 */
package formulario;


import java.sql.*;
import java.sql.PreparedStatement;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
/**
 *
 * @author ALEX
 */
public class Preguntas extends javax.swing.JFrame {

    private Connection conn;
    ResultSet res=null;
    int temporal=0;
    String cbox="";
    int a=-1;
    /** Creates new form Preguntas */
    public Preguntas() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        pregunta = new javax.swing.JTextField();
        respuesta1 = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        respuesta2 = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        respuesta3 = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        respuesta4 = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        anterior1 = new javax.swing.JButton();
        siguiente = new javax.swing.JButton();
        insertar = new javax.swing.JButton();
        borrar = new javax.swing.JButton();
        nueva = new javax.swing.JButton();
        box = new javax.swing.JComboBox();
        jLabel7 = new javax.swing.JLabel();
        rta = new javax.swing.JComboBox();
        valor1 = new javax.swing.JComboBox();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenu2 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Editor de Preguntas");
        setBackground(new java.awt.Color(230, 230, 216));
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosed(java.awt.event.WindowEvent evt) {
                formWindowClosed(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Centaur", 1, 14));
        jLabel1.setForeground(new java.awt.Color(51, 51, 0));
        jLabel1.setText("Pregunta");

        jButton1.setFont(new java.awt.Font("Centaur", 1, 14)); // NOI18N
        jButton1.setForeground(new java.awt.Color(51, 0, 51));
        jButton1.setText("Leer BD");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                leebd(evt);
            }
        });

        pregunta.setEditable(false);
        pregunta.setText("");

        respuesta1.setEditable(false);
        respuesta1.setText("");

        jLabel2.setFont(new java.awt.Font("Centaur", 1, 14)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(51, 51, 0));
        jLabel2.setText("Respuesta 1");

        jLabel3.setFont(new java.awt.Font("Centaur", 1, 14));
        jLabel3.setForeground(new java.awt.Color(51, 51, 0));
        jLabel3.setText("Respuesta 2");

        respuesta2.setEditable(false);
        respuesta2.setText("");

        jLabel4.setFont(new java.awt.Font("Centaur", 1, 14));
        jLabel4.setForeground(new java.awt.Color(51, 51, 0));
        jLabel4.setText("Respuesta 3");

        respuesta3.setEditable(false);
        respuesta3.setText("");

        jLabel5.setFont(new java.awt.Font("Centaur", 1, 14));
        jLabel5.setForeground(new java.awt.Color(51, 51, 0));
        jLabel5.setText("Respuesta 4");

        respuesta4.setEditable(false);
        respuesta4.setText("");

        jLabel6.setFont(new java.awt.Font("Centaur", 1, 14)); // NOI18N
        jLabel6.setForeground(new java.awt.Color(51, 51, 0));
        jLabel6.setText("Valor Pregunta");

        anterior1.setFont(new java.awt.Font("Centaur", 1, 14)); // NOI18N
        anterior1.setForeground(new java.awt.Color(51, 0, 51));
        anterior1.setText("<<");
        anterior1.setEnabled(false);
        anterior1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                anterior(evt);
            }
        });

        siguiente.setFont(new java.awt.Font("Centaur", 1, 14)); // NOI18N
        siguiente.setForeground(new java.awt.Color(51, 0, 51));
        siguiente.setText(">>");
        siguiente.setEnabled(false);
        siguiente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                siguiente(evt);
            }
        });

        insertar.setFont(new java.awt.Font("Centaur", 1, 14)); // NOI18N
        insertar.setForeground(new java.awt.Color(51, 0, 51));
        insertar.setText("Insertar");
        insertar.setEnabled(false);
        insertar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                insertar(evt);
            }
        });

        borrar.setFont(new java.awt.Font("Centaur", 1, 14)); // NOI18N
        borrar.setForeground(new java.awt.Color(51, 0, 51));
        borrar.setText("Borrar");
        borrar.setEnabled(false);
        borrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                borrar(evt);
            }
        });

        nueva.setFont(new java.awt.Font("Centaur", 1, 14)); // NOI18N
        nueva.setForeground(new java.awt.Color(51, 0, 51));
        nueva.setText("Nuevo");
        nueva.setEnabled(false);
        nueva.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nueva(evt);
            }
        });

        box.setFont(new java.awt.Font("Centaur", 1, 14)); // NOI18N
        box.setForeground(new java.awt.Color(51, 51, 0));
        box.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "matematicas", "informatica", "literatura" }));

        jLabel7.setFont(new java.awt.Font("Centaur", 1, 14)); // NOI18N
        jLabel7.setForeground(new java.awt.Color(51, 51, 0));
        jLabel7.setText("Respuesta Correcta");

        rta.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4" }));
        rta.setEnabled(false);

        valor1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" }));
        valor1.setEnabled(false);

        jMenu1.setText("File");
        jMenuBar1.add(jMenu1);

        jMenu2.setText("Edit");
        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(nueva)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(layout.createSequentialGroup()
                                                .addComponent(jLabel6)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 150, Short.MAX_VALUE)
                                                .addComponent(valor1, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGroup(layout.createSequentialGroup()
                                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(jLabel2)
                                                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(jLabel3)
                                                    .addComponent(jLabel5)
                                                    .addComponent(jLabel4))
                                                .addGap(18, 18, 18)
                                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(respuesta4, javax.swing.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)
                                                    .addComponent(respuesta3, javax.swing.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)
                                                    .addComponent(respuesta2, javax.swing.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)
                                                    .addComponent(respuesta1, javax.swing.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)
                                                    .addComponent(pregunta, javax.swing.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)))
                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                                .addComponent(jLabel7)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 166, Short.MAX_VALUE)
                                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(rta, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                                        .addComponent(siguiente)
                                                        .addComponent(borrar)))))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                                    .addGroup(layout.createSequentialGroup()
                                        .addGap(56, 56, 56)
                                        .addComponent(jButton1)
                                        .addGap(18, 18, 18)
                                        .addComponent(box, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(11, 11, 11))))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(106, 106, 106)
                                .addComponent(insertar))))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(anterior1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                .addGap(19, 19, 19))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(15, 15, 15)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(pregunta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(10, 10, 10)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(respuesta1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(respuesta2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(respuesta3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(14, 14, 14)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(respuesta4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(valor1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(10, 10, 10)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(rta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(box, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(8, 8, 8)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(nueva)
                    .addComponent(insertar)
                    .addComponent(borrar))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(anterior1)
                    .addComponent(siguiente))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
private void carga(){
 try
          {
       a= box.getSelectedIndex();

        switch (a){
            case 0:
            cbox="matematicas";
            break;
            case 1:
            cbox="informatica";
            break;
            case 2:
            cbox="literatura";
            break;

        }
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            conn = DriverManager.getConnection("jdbc:odbc:alex");
            Statement st=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
            res=st.executeQuery("SELECT * FROM "+cbox+"");
            res.first();
                       
            pregunta.setText(res.getString(2));
            respuesta1.setText(res.getString(3));
            respuesta2.setText(res.getString(4));
            respuesta3.setText(res.getString(5));
            respuesta4.setText(res.getString(6));
            int aa=res.getInt(7);
            rta.setSelectedIndex(aa-1);
            int bb=res.getInt(8);
            valor1.setSelectedIndex(bb-1);
            temporal=res.getInt(1);
            
            
           // conn.close();
            
    }catch(Exception ex)
        {
            ex.printStackTrace();
        } 
}
private void leebd(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_leebd
  carga();
  nueva.setEnabled(true);
  anterior1.setEnabled(true);
  borrar.setEnabled(true);
  siguiente.setEnabled(true);
           // TODO add your handling code here:
}//GEN-LAST:event_leebd

private void siguiente(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_siguiente
// TODO add your handling code here:
     try   {
            res.next();
            if(res.isAfterLast()!=true){
            pregunta.setText(res.getString(2));
            respuesta1.setText(res.getString(3));
            respuesta2.setText(res.getString(4));
            respuesta3.setText(res.getString(5));
            respuesta4.setText(res.getString(6));
            int aa=res.getInt(7);
            rta.setSelectedIndex(aa-1);
            int bb=res.getInt(8);
            valor1.setSelectedIndex(bb-1);
            temporal=res.getInt(1);
                                        }
            else{
            JOptionPane.showMessageDialog(null, "no hay registor siguiente","Error",JOptionPane.ERROR_MESSAGE);
            res.last();
            }
           }
            catch(Exception ex)
           {
            ex.printStackTrace();
           }
     
}//GEN-LAST:event_siguiente

private void anterior(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_anterior
  // TODO add your handling code here:
    try   {
            res.previous();
            if(res.isBeforeFirst()!=true){
            pregunta.setText(res.getString(2));
            respuesta1.setText(res.getString(3));
            respuesta2.setText(res.getString(4));
            respuesta3.setText(res.getString(5));
            respuesta4.setText(res.getString(6));
            int aa=res.getInt(7);
            rta.setSelectedIndex(aa-1);
            int bb=res.getInt(8);
            valor1.setSelectedIndex(bb-1);
            temporal=res.getInt(1);
                                         }
            else{
            JOptionPane.showMessageDialog(null, "no hay registor anterior","Error",JOptionPane.ERROR_MESSAGE);
            res.first();   
            }
          }
         catch(Exception ex)
          {
            ex.printStackTrace();
          }
}//GEN-LAST:event_anterior

private void insertar(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_insertar
   pregunta.getText().isEmpty();
   if(pregunta.getText().isEmpty() ||respuesta1.getText().isEmpty() ||respuesta2.getText().isEmpty() ||respuesta3.getText().isEmpty() ||respuesta4.getText().isEmpty()){
     JOptionPane.showMessageDialog(null, "TODOS los campos son obligatorios","Error",JOptionPane.ERROR_MESSAGE);
        }
   else{
       try
    {       
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            conn = DriverManager.getConnection("jdbc:odbc:alex");
            PreparedStatement st = conn.prepareStatement("INSERT INTO "+cbox+" (`enunciado`,`respuesta1`,`respuesta2`,`respuesta3`,`respuesta4`,`respuestacorrecta`,`Valorpregunta`) VALUES (?,?,?,?,?,?,?)");
            st.setString(1,pregunta.getText());
            st.setString(2,respuesta1.getText());
            st.setString(3,respuesta2.getText());
            st.setString(4,respuesta3.getText());
            st.setString(5,respuesta4.getText());
            int otro =rta.getSelectedIndex()+1;
            st.setInt(6,otro+1);
            int s= valor1.getSelectedIndex()+1;
            st.setInt(7,s);
            st.executeUpdate();
            conn.close();
            pregunta.setEditable(false);
            respuesta1.setEditable(false);
            respuesta2.setEditable(false);
            respuesta3.setEditable(false);
            respuesta4.setEditable(false);
            valor1.setEnabled(false);
            rta.setEnabled(false);
            nueva.setEnabled(true);
            anterior1.setEnabled(true);
            insertar.setEnabled(false);
            borrar.setEnabled(true);
            siguiente.setEnabled(true);
            rta.setEnabled(false);
            carga();
      }catch(Exception ex)
        {
            ex.printStackTrace();
        }
       }
}//GEN-LAST:event_insertar

private void borrar(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_borrar
// TODO add your handling code here:
    try
    {
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         conn = DriverManager.getConnection("jdbc:odbc:alex");
         PreparedStatement st = conn.prepareStatement("DELETE FROM "+cbox+" where idPregunta  = ?");
         st.setInt(1,temporal); 
         st.executeUpdate();
         carga();
    }
    catch(Exception ex)
        {
            ex.printStackTrace();
        }  
}//GEN-LAST:event_borrar

private void nueva(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nueva
insertar.setEnabled(true);
pregunta.setText("");
pregunta.setEditable(true);
respuesta1.setText("");
respuesta1.setEditable(true);
respuesta2.setText("");
respuesta2.setEditable(true);
respuesta3.setText("");
respuesta3.setEditable(true);
respuesta4.setText("");
respuesta4.setEditable(true);
valor1.setSelectedIndex(0);
valor1.setEditable(true);
anterior1.setEnabled(false);
borrar.setEnabled(false);
siguiente.setEnabled(false);
rta.setEnabled(true);
valor1.setEnabled(true);
}//GEN-LAST:event_nueva

private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed
  
        try {
            if(conn!=null){
                conn.close();        
                          }
        } catch(Exception ex)
        {
            ex.printStackTrace();
        }
}//GEN-LAST:event_formWindowClosed

    /*
     
     */
    public static void main(String args[]) {
        
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Preguntas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Preguntas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Preguntas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Preguntas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Preguntas().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton anterior1;
    private javax.swing.JButton borrar;
    private javax.swing.JComboBox box;
    private javax.swing.JButton insertar;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JButton nueva;
    private javax.swing.JTextField pregunta;
    private javax.swing.JTextField respuesta1;
    private javax.swing.JTextField respuesta2;
    private javax.swing.JTextField respuesta3;
    private javax.swing.JTextField respuesta4;
    private javax.swing.JComboBox rta;
    private javax.swing.JButton siguiente;
    private javax.swing.JComboBox valor1;
    // End of variables declaration//GEN-END:variables
}
